package com.henu.art.service.Imlp;

import com.henu.art.entity.Teacher;
import com.henu.art.mapper.TeacherMapper;
import com.henu.art.service.loginService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class loginServiceImpl implements loginService {

    @Resource
    private TeacherMapper mapper;

    @Override
    public boolean login(String id, String password) {
        Teacher teacher = mapper.selectById(id);
        if(teacher !=null){
            return teacher.getPassword().equals(password);
        }
        return false;
    }
}
